package com.example.lin.work1;

import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Parcelable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;

import java.io.File;

public class DetailActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_detail);
        ImageView iv_show = findViewById(R.id.iv_show);


        Intent intent = getIntent();
        String imagePath = intent.getStringExtra("imagePath");
//        Bitmap bitmap = BitmapFactory.decodeFile(imagePath);
//        iv_show.setImageBitmap(bitmap);
        //使用 Glide 加载本地图片
        Glide.with(this).load(new File(imagePath)).into(iv_show);

    }
}
